package ib_model.src;

//
// IBUF: Input Buffer
//
simple IBInBuf
{
 parameters:
  // input line width 4x,8x,12x
  int width; 
  // if 1 means the input buffer is part  of HCA (no routing required)
  int isHcaIBuf;
  // number of output ports to drive to
  int numPorts;
  // max number of parallel sends = switch "speed-up"
  int maxBeingSent;
  // the total buffer size in credits
  int totalBufferSize; 
  // max VL num. If only VL0 value is 0
  int maxVL;
  // declares the buffer as lossy - drop packets if full but lie about the free credits
  bool lossyMode;

  // Each VL is assigned a max number of static credits 
  int maxStatic0;
  int maxStatic1;
  int maxStatic2;
  int maxStatic3;
  int maxStatic4;
  int maxStatic5;
  int maxStatic6;
  int maxStatic7;
 gates:
  input in;
  input sent[];
  output out[];
  output txCred;
  output rxCred;
}
